﻿using Nova_BLL;
using Nova_Common.Extend;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WMS_Api.App_Start;
using WMS_Api.Areas.RFSystem.Models;
using WMS_Api.Controllers;
using WMS_Api.Models;

namespace WMS_Api.Areas.RFSystem.Controllers
{
    /// <summary>
    /// 手持出库操作
    /// </summary>
    [RoutePrefix("api/RFSystem/PickUp")]
    [ControllerGroup("PDA手持", "出库操作功能接口")]
    public class PickUpController : BaseApiController
    {
        RFBll RfBll = new RFBll();

        /// <summary>
        /// 根据托盘码获取出库指令信息
        /// </summary>
        /// <param name="trayId"></param>
        /// <returns></returns>
        [HttpGet, Route("GetCommandByTrayId")]
        public ApiResult GetCommandByTrayId(string trayId)
        {
            if (trayId.IsEmpty())
                return Error(ResultCode.ParaError, "托盘码不能为空!");
            TCommandBll bll = new TCommandBll();
            var model = bll.GetByTrayId(trayId);
            return Success("根据托盘码获取出库指令信息", model);
        }
    }
}
